#include "backgroundworker.h"
#include "utils/log.h"

void BackgroundWorker::runInBackground(const char *slot,QHash<QString, QVariant> args) {
    LOGD("BEGIN");
    this->moveToThread(&backgroundWorkerThread);
    const char *signal = SIGNAL(doWork());
    connect(this, signal, this, slot);
    backgroundWorkerThread.start();
    this->args = args;
    emit this->doWork();
    LOGD("END");
}
